Find a data set on Transportation and create one interactive plot using plotly. All of your axes, titles, subtitles, and captions must be labeled and all of the visualizations must be colorful and easy to read.

#install.packages("plotly")
#install.packages("htmlwidgets")
library(plotly)
Loading required package: ggplot2
RStudio Community is a great place to get help:
https://community.rstudio.com/c/tidyverse
Registered S3 methods overwritten by 'htmltools':
  method               from         
  print.html           tools:rstudio
  print.shiny.tag      tools:rstudio
  print.shiny.tag.list tools:rstudio
Registered S3 method overwritten by 'htmlwidgets':
  method           from         
  print.htmlwidget tools:rstudio

Attaching package: ‘plotly’

The following object is masked from ‘package:ggplot2’:

    last_plot

The following object is masked from ‘package:stats’:

    filter

The following object is masked from ‘package:graphics’:

    layout
packageVersion('plotly')
[1] ‘4.9.3’
flights <- read.csv("~/Downloads/feb-20-us-flight-delay.csv")
View(flights)
summary(flights)
     MONTH    DAY_OF_MONTH    DAY_OF_WEEK   
 Min.   :2   Min.   : 1.00   Min.   :1.000  
 1st Qu.:2   1st Qu.: 8.00   1st Qu.:2.000  
 Median :2   Median :15.00   Median :4.000  
 Mean   :2   Mean   :15.18   Mean   :3.989  
 3rd Qu.:2   3rd Qu.:22.00   3rd Qu.:6.000  
 Max.   :2   Max.   :29.00   Max.   :7.000  
                                            
 OP_UNIQUE_CARRIER     ORIGIN         
 Length:574268      Length:574268     
 Class :character   Class :character  
 Mode  :character   Mode  :character  
                                      
                                      
                                      
                                      
     DEST              DEP_TIME      DEP_DEL15    
 Length:574268      Min.   :   1   Min.   :0.000  
 Class :character   1st Qu.: 918   1st Qu.:0.000  
 Mode  :character   Median :1328   Median :0.000  
                    Mean   :1333   Mean   :0.144  
                    3rd Qu.:1741   3rd Qu.:0.000  
                    Max.   :2400   Max.   :1.000  
                    NA's   :4938   NA's   :4951   
    DISTANCE         X          
 Min.   :  31.0   Mode:logical  
 1st Qu.: 369.0   NA's:574268   
 Median : 641.0                 
 Mean   : 795.7                 
 3rd Qu.:1036.0                 
 Max.   :5095.0                 
                                
originflights <- flights %>% group_by(DAY_OF_WEEK) %>% summarise(Avg = mean(DISTANCE))
`summarise()` ungrouping output (override with `.groups` argument)
a <- ggplot(originflights, aes(x = DAY_OF_WEEK, y = Avg, fill = DAY_OF_WEEK)) +
  geom_bar(stat = "identity") + 
  theme(legend.position = "none") +
  labs(title = "Average Distance of Days of Week",
       subtitle = "The graph shows the average flight distance of every day of the week",
       x = "Days of the Week",
       y = "Average Distance") 
a

ggplotly(a)
LS0tCnRpdGxlOiAiRGlzY3Vzc2lvbiAzIgpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sKLS0tCgpGaW5kIGEgZGF0YSBzZXQgb24gVHJhbnNwb3J0YXRpb24gYW5kIGNyZWF0ZSBvbmUgaW50ZXJhY3RpdmUgcGxvdCB1c2luZyBwbG90bHkuIEFsbCBvZiB5b3VyIGF4ZXMsIHRpdGxlcywgc3VidGl0bGVzLCBhbmQgY2FwdGlvbnMgbXVzdCBiZSBsYWJlbGVkIGFuZCBhbGwgb2YgdGhlIHZpc3VhbGl6YXRpb25zIG11c3QgYmUgY29sb3JmdWwgYW5kIGVhc3kgdG8gcmVhZC4gCgpgYGB7cn0KI2luc3RhbGwucGFja2FnZXMoInBsb3RseSIpCiNpbnN0YWxsLnBhY2thZ2VzKCJodG1sd2lkZ2V0cyIpCmBgYAoKYGBge3J9CmxpYnJhcnkocGxvdGx5KQpwYWNrYWdlVmVyc2lvbigncGxvdGx5JykKYGBgCgpgYGB7cn0KZmxpZ2h0cyA8LSByZWFkLmNzdigifi9Eb3dubG9hZHMvZmViLTIwLXVzLWZsaWdodC1kZWxheS5jc3YiKQpWaWV3KGZsaWdodHMpCmBgYAoKYGBge3J9CnN1bW1hcnkoZmxpZ2h0cykKYGBgCgpgYGB7cn0Kb3JpZ2luZmxpZ2h0cyA8LSBmbGlnaHRzICU+JSBncm91cF9ieShEQVlfT0ZfV0VFSykgJT4lIHN1bW1hcmlzZShBdmcgPSBtZWFuKERJU1RBTkNFKSkKCmEgPC0gZ2dwbG90KG9yaWdpbmZsaWdod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